home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
B-Book Series
/
(k)b4.d64
/
example4.3b
< prev
next >
Wrap
Text File
|
2007-02-28
|
643b
|
23 lines
0010 DIM LETTER$ OF 30, CH$ OF 1, SEEK$ OF 1
0020 FOR K:=1 TO 30 DO LETTER$(K:K):=CHR$(RND(65,90))
0025 REPEAT
0030 INPUT "TYPE S OR C OR E AND <RETURN>": CH$
0035 UNTIL CH$="S" OR CH$="C" OR CH$="E"
0037 IF CH$="E" THEN STOP
0040 IF CH$="S" THEN
0045 REPEAT
0050 INPUT "WHAT IS THE LETTER YOU SEEK?": SEEK$
0055 UNTIL SEEK$>="A" AND SEEK$<="Z"
0060 FOR POS:=1 TO 30 DO
0070 IF SEEK$=LETTER$(POS:POS) THEN PRINT POS
0080 ENDFOR POS
0090 ELSE
0105 REPEAT
0110 INPUT "WHICH POSITION?": POS
0115 UNTIL POS>=1 AND POS<=30
0116 REPEAT
0120 INPUT "WHICH CHARACTER?": CH$
0125 UNTIL CH$>="A" AND CH$<="Z"
0130 LETTER$(POS:POS):=CH$
0140 ENDIF